var IsUploading = false;

/**
	@breif Upload image
	@param ID of image widget
**/
function UploadImage(ID) {
	document.getElementById('image_article_id' + ID).value = article_id;
	document.getElementById('image_updoad' + ID).submit();
	IsUploading = true;
}

/**
	@breif Finish uploading image
	@param ID of image widget
**/
function FinishUpload(ID) {
	if(IsUploading) {
		LoadCommandResult('cancel', {'id': ID, 'tocallback_prefix': 'content'});
		IsUploading = false;
	}
}